package service.impl.v2;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;

import service.v2.CacheManagerService;

@Service
public class CacheManagerServiceImpl implements CacheManagerService{
	
	//商品详情key
	public static String good_detail_key = "class service.impl.v2.GoodServiceImplgetGoodById";
	
	/**
	 * 删除商品列表缓存
	 */
	@CacheEvict(value={"GoodServiceImpl_getGoodList","GoodServiceImpl_getTotal"}, allEntries=true)
	public void deleteGoodListCache(){
		
	}
	
	/**
	 * 删除商品详情缓存
	 * @param id
	 */
	@CacheEvict(value={"GoodServiceImpl_getGoodById"}, key="#id")
	public void deleteGoodDetailCache(String id){
		
	}
	
	/**
	 * 特殊商品列表
	 */
	@CacheEvict(value={"GoodServiceImpl_getSpecialGoodList","GoodServiceImpl_getSpecialTotal"}, allEntries=true)
	public void deleteSpecialListCache(){
		
	}
	
	/**
	 * 删除随机商品列表缓存
	 */
	@CacheEvict(value={"GoodServiceImpl_getRandomGoodListNoLogin"}, allEntries=true)
	public void deleteRandomGoodListNoLogin(){
		
	}
	
	@Override
	@CacheEvict(value={"ConfigServiceImpl_loadConfig"}, key="#key")
	public void deleteConf(String key) {
	}
}
